package com.fac.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 巡检记录表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("inspection_records")
@ApiModel(description = "巡检记录实体类")
public class InspectionRecord implements Serializable {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "记录ID", example = "1")
    private Long recordId;

    @ApiModelProperty(value = "计划ID", example = "1", required = true)
    private Long planId;

    @ApiModelProperty(value = "设备ID", example = "1", required = true)
    private Long equipmentId;

    @ApiModelProperty(value = "巡检人ID", example = "1", required = true)
    private Long inspectorId;

    @ApiModelProperty(value = "巡检结果JSON字符串", example = "[{\"itemName\":\"外观检查\",\"checkResult\":\"完好\",\"photos\":[\"photo1.jpg\",\"photo2.jpg\"]}]", required = true)
    private String result;

    @ApiModelProperty(value = "异常描述", example = "设备外壳有轻微磨损")
    private String abnormalDescription;

    @ApiModelProperty(value = "处理建议", example = "建议更换外壳")
    private String handlingSuggestions;

    @ApiModelProperty(value = "巡检时间", example = "2024-01-01 12:00:00", required = true)
    private LocalDateTime inspectionTime;

    @ApiModelProperty(value = "创建时间", example = "2024-01-01 12:00:00")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间", example = "2024-01-01 12:00:00")
    private LocalDateTime updatedAt;
} 